<?php get_header(); ?>
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/magic360/magic360.css" type="text/css" />
<script src="<?php bloginfo('template_url') ?>/magic360/magic360.js" type="text/javascript"></script>
<script type="text/javascript">
  jQuery(document).ready(function() {
    $('.Magic360-button').siblings('div').hide();
  });
  
  Magic360.options = {
    onready: function(spin) { $('.Magic360-button').siblings('div').hide(); }
  }
</script>

<?php $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>

<div class="news news-detail single single-product">
  <div class="news-header">
    <h2>Track</h2>
    <p><?php the_field('product_code', $post->ID); ?></p>
  </div>
  <div class="news-content">
    <div class="share">
      <?php echo do_shortcode('[wpsr_facebook]'); ?>
      <?php echo do_shortcode('[wpsr_retweet]'); ?>
      <?php echo do_shortcode('[wpsr_plusone]'); ?>
    </div>
    
    <div class="pic-container vshadow4">
      <a href="<?php bloginfo('template_url'); ?>/images/track/01.jpg" class="Magic360" data-magic360-options="autospin: infinite; columns: 10; filename:{col}.jpg; magnify-filename:{col}.jpg;">
				<img src="<?php bloginfo('template_url'); ?>/images/track/01.jpg" />
        <?php
          // $attachments = attachments_get_attachments();
          // $total_attachments = count( $attachments );
          // for( $i=0; $i<$total_attachments; $i++ ) :
        ?>
          <!--<img src="<?php //echo $attachments[$i]['location'] ?>" />-->
        <?php //endfor; ?>
      </a>
      <hr />
    </div>
    
    <div class="product-content">
      <ul>
        <li>Lebih Tajam</li>
        <li>Lebih Kuat</li>
        <li>Lebih Mudah</li>
        <li>Tersedia Ukuran B4 & A3</li>
      </ul>
      
      <div class="discount">
        <h2>Discount up to 20%</h2>
        <p>* untuk pembelian partai</p>
      </div>
    </div>
    <div class="clear"></div>
    
    <div class="navigation">
      <?php
      $prev_post = get_previous_post(false,'4,18');
      if (!empty( $prev_post )): ?>
        <a class="btn" href="<?php echo get_permalink( $prev_post->ID ); ?>">&laquo; Sebelumnya</a>
      <?php endif; ?>
      
      <?php
      $next_post = get_next_post(false,'4,18');
      if (!empty( $next_post )): ?>
        <a class="btn" href="<?php echo get_permalink( $next_post->ID ); ?>">Selanjutnya &raquo;</a>
      <?php endif; ?>
      
      <div class="clear"></div>
    </div>
  </div>
  <div class="clear"></div>
</div>

<?php get_footer(); ?>